package com.caishi.lkx.user;

import com.zzw.common.ResultCode;
import lombok.Getter;

/**
 * @author by keray
 * date:2021/4/7 1:53 下午
 * 局部错误码：1000-2000
 */
public enum UserResultCode implements ResultCode {
    groupBindFail(1601, "未识别到有效IP,绑定失败"),
    groupExpired(1602, "机构已过期"),
    memberExpired(1603, "用户已失效"),
    groupNotMatch(1604, "当前机构和用户绑定机构不一致"),
    //
    dataExist(1701, "该数据已存在"),
    exportFail(1702, "导出失败"),
    //    其他
    bindFail(1801, "该学科已绑定，不可更改"),
    bindError(1802, "学科绑定出错"),
    agentRechargeException(1901, "代理商充值失败"),
    agentConsumException(1902, "代理商扣款失败"),
    agentRefundException(1903, "代理商退款失败"),
    agentNotExist(1904, "代理商不存在"),
    agentBalanceOff(1905, "代理商余额不足"),
    agentResourceNotExist(2003, "资源不存在"),
    canotRepeat(2004, "不能重复评价"),
    thirdLoginCodeFail(2005, "获取用户信息失败"),
    accessTokenFail(2005, "获取用户信息失败"),
    bindPhone(2006, "请绑定手机号"),
    getUserInfoFail(2007, "获取用户信息失败"),
    unionIdFail(2008, "获取用户信息失败"),
    invalidQRcode(2009, "无效二维码"),
    expireQrcode(2010, "二维码已过期"),
    //    极光相关
    getJiGuangFail(2100, "获取用户信息异常"),
    getJiGuangUserInfoFail(2101, "获取用户信息异常"),
    getJiGuangUserStateFail(2102, "修改用户信息异常"),
    getJiGuangUpdateUserPasswordFail(2103, "修改用户信息异常"),
    getJiGuangUpdateUserInfoFail(2103, "修改用户信息异常"),

    // 登录相关
    notSetPass(1979, "您还未设置密码，请先重置密码"),
    registerFail(1980, "用户注册失败失败"),
    accesstokenFail(1981, "获取用户信息失败"),
    loginFail(1982, "登录失败，请重试或更换登录方式"),
    iosLoginAuthFail(1983, "登录授权失败，请重新授权"),
    loginFail5(1984, "登录失败超过5次，账号被锁定，1分钟后再试"),
    accountIsOff(1985, "账号已注销"),
    userHaveBindMobile(1985, "您已经绑定手机号，无须再次绑定"),
    accountException(1986, "账号异常，请联系客服"),
    mobileHaveBind(1987, "手机号已被绑定，请更换手机号"),
    phoneNotRegister(1989, "手机号未注册，请先注册"),
    usernameExits(1990, "用户已存在"),
    smsCodeError(1992, "验证码错误"),
    smsCodeSendFail(1993, "短信验证码发送失败，请重试"),
    loginInfoNotEnable(1994, "账号已被关闭，请联系客服"),
    loginInfoExits(1995, "账号已存在"),
    registerMobileExits(1996, "该手机已经注册, 请登录"),
    loginAuthFail(1997, "账号或密码错误，请重新输入"),
    loginAuthFailFormat(1997, "账号或密码错误，请重新输入，连续输错超过%d次账号将会被锁定，剩余%d次机会"),
    loginInfoNotFound(1998, "账号不存在，请先注册"),
    loginInfoIsLock(1999, "账号已被锁定，请联系管理员解锁"),
    loginInfoIsLockFormat(1999, "帐号输入错误次数太多!请%d分钟后再登录"),
    QRcodeExpire(2000, "二维码已过期"),//carsi
    casiLoginError(2001, "抱歉，您的账号暂时无法使用该功能，请通过CARSI登录平台。"),
    phoneOneClickFail(2002,"一键登录异常，请切换登录方式或者稍后重试"),
    ;

    @Getter
    private final int code;
    @Getter
    private final String message;

    UserResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
